package de.fhluebeck.oop.gps.cmd;

/**
 * 
 * Option zur Ausgabe der Hilfe 
 *
 * @author Ogün Bilge, Leif Hitzschke
 * @version 1.00, 13.11.2009
 * 
 */

class HelpOption extends Option {
	private Option successor ;
	private boolean called = false;
	

	public HelpOption(Option successor) {
		this.successor = successor;
	}

	public HelpOption() {
		this.successor = null;
	}
	
	
	@Override
	boolean isApplicable(String key) {
		return ! called;
	}

	@Override
	Option getSuccessor() {
		return successor;
	}

	@Override
	void execute(String value) {
		called = true;
		System.out.println("Usage: ");
		System.out.println("-help  \t Gibt diesen Hilfetext aus");
		System.out.println("-showpoi lat,lng,distance \t Gibt die Punkte im Umkreis von distance Metern aus ");
	}

}
